package messaging;

import java.io.Serializable;

@SuppressWarnings("serial")
public class HashTableMessage implements Serializable
{
  /**
   * the key of the message.
   */
  private String my_key;
  /**
   * The hash of this key.
   */
  private int my_hash;
  /**
   * the object associated with this key.
   */
  private Serializable my_value;
  /**
   * The rmi registry name for this future object.
   */
  private int unique_id;
  /**
   * Constructor to set all the parameters.
   */
  public HashTableMessage(String my_key, Serializable my_value, int my_hash)
  {
    this.my_key = my_key;
    this.my_value = my_value;
    this.my_hash = my_hash;
  }
  /**
   * Sets the future unique id.
   */
  public void setUniqueid(int unique_id)
  {
    this.unique_id = unique_id;
  }
  /**
   * Gets the unique id.
   */
  public int getUniqueid()
  {
    return this.unique_id;
  }
  /**
   * get key.
   * @return
   */
  public String getkey()
  {
    return my_key;
  }
  /**
   * set key 
   * @param my_key.
   */
  public void setkey(String my_key)
  {
    this.my_key = my_key;
  }
  /**
   * get hash.
   * @return
   */
  public int gethash()
  {
    return my_hash;
  }
  /**
   * set hash.
   * @param my_hash
   */
  public void sethash(int my_hash)
  {
    this.my_hash = my_hash;
  }
  /**
   * get value.
   * @return
   */
  public Serializable getvalue()
  {
    return my_value;
  }
  /**
   * set value.
   * @param my_value
   */
  public void setvalue(Serializable my_value)
  {
    this.my_value = my_value;
  }
  /**
   * get rmi name.
   * @return
   */
  public int getUniqueId()
  {
    return this.unique_id;
  }
  /**
   * set rmi name.
   * @param rmi_name
   */
  public void setUniqueId(int unique_id)
  {
    this.unique_id = unique_id;
  }
}
